<template>
  <div id="app">
    <h1>父类组件 --> {{ count }}</h1>
    <PainaSon1></PainaSon1>
    <PainaSon2></PainaSon2>
    <h5>新闻列表  <button @click="counterStore.getList">获取新闻列表</button></h5>
    <ul>
      <li v-for="item in counterStore.channelList">
        {{item.name}}
      </li>
    </ul>
  </div>
</template>
<script setup>

import {userCounterStore} from "@/store";
import PainaSon1 from "@/components/Paina-Son1.vue";
import PainaSon2 from "@/components/Paina-Son2.vue";
import {storeToRefs} from "pinia";
const counterStore = new userCounterStore()
const { count } = storeToRefs(counterStore)

</script>
<style scoped lang="less">

</style>
